import React, { Component, Fragment } from "react";


export default class HomeHead extends Component {
    componentDidMount(){
       
    }
    changeCategory = (event) => {
        let thisId = event.target.dataset.categroy;
        this.props.changeCategroy(thisId);
        console.log(this.props);
        
    }
    render() {
        return (
            <ul onClick={this.changeCategory}>
                <li data-categroy='react' className={this.props.categroy == 'react' ? 'hover' : ''}>
                    超值折扣
               </li>
                <li data-categroy='vue' className={this.props.categroy == 'vue' ? 'hover' : ''}>
                    新人抢购
               </li>
            </ul>
        )
    }
}